Skip to content

feat(posts): support scheduling all post types#3975

Merged
idoshamun merged 1 commit into
mainfrom
codex/schedule-all-post-types
Jul 5, 2026
Merged

feat(posts): support scheduling all post types#3975
idoshamun merged 1 commit into
mainfrom
codex/schedule-all-post-types

Conversation

@idoshamun

@idoshamun idoshamun commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary:

  • Add scheduledAt support to one-source sharePost, submitExternalLink, and createPollPost flows.
  • Reuse existing scheduled-post flags/Temporal publish flow while keeping moderation and createPostInMultipleSources scheduling unsupported.
  • List all scheduled post types in scheduledPosts and add regression coverage for share, external link, poll, scheduled listing, and content-update workers preserving scheduled shares.
  • Guard postUpdated worker visibility updates so scheduled posts/shares are not published before Temporal.

Validation:

  • pnpm exec prettier --write src/common/post.ts src/entity/posts/utils.ts src/schema/posts.ts src/entity/SourcePostModeration.ts tests/posts.ts src/workers/postUpdated/shared.ts tests/workers/postUpdated.ts
  • NODE_ENV=test npx jest tests/posts.ts --testEnvironment=node --runInBand -t "should throw error when content exceeds maximum length|should return link preview and image being the placeholder when empty|should return an error if content exceeds 20000 characters|should schedule shared post|should create invisible share and still return mutation result|should schedule createPollPost|should schedule external link share|should list scheduled posts"
  • NODE_ENV=test npx jest tests/workers/postUpdated.ts --testEnvironment=node --runInBand -t "should update all the post related shared posts to visible|should not update scheduled shared posts to visible"
  • pnpm run build
  • pnpm run lint

@pulumi

pulumi Bot commented Jul 3, 2026

Copy link
Copy Markdown

🍹 The Update (preview) for dailydotdev/api/prod (at 603e4d7) was successful.

Resource Changes

    Name                                                    Type                           Operation
~   vpc-native-update-tag-materialized-views-cron           kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-achievements-cron             kubernetes:batch/v1:CronJob    update
+   vpc-native-api-clickhouse-migration-fd646a4f            kubernetes:batch/v1:Job        create
~   vpc-native-generic-referral-reminder-cron               kubernetes:batch/v1:CronJob    update
~   vpc-native-validate-active-users-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-old-notifications-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-sync-subscription-with-cio-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-updated-sync-cron               kubernetes:batch/v1:CronJob    update
~   vpc-native-update-trending-cron                         kubernetes:batch/v1:CronJob    update
~   vpc-native-daily-digest-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-analytics-clickhouse-cron       kubernetes:batch/v1:CronJob    update
~   vpc-native-user-posts-analytics-refresh-cron            kubernetes:batch/v1:CronJob    update
~   vpc-native-personalized-digest-deployment               kubernetes:apps/v1:Deployment  update
~   vpc-native-rotate-daily-quests-cron                     kubernetes:batch/v1:CronJob    update
~   vpc-native-ws-deployment                                kubernetes:apps/v1:Deployment  update
~   vpc-native-clean-stale-user-transactions-cron           kubernetes:batch/v1:CronJob    update
~   vpc-native-channel-digests-cron                         kubernetes:batch/v1:CronJob    update
~   vpc-native-rotate-weekly-quests-cron                    kubernetes:batch/v1:CronJob    update
~   vpc-native-temporal-deployment                          kubernetes:apps/v1:Deployment  update
+   vpc-native-api-db-migration-fd646a4f                    kubernetes:batch/v1:Job        create
~   vpc-native-expire-super-agent-trial-cron                kubernetes:batch/v1:CronJob    update
~   vpc-native-channel-highlights-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-channel-highlights-cron                kubernetes:batch/v1:CronJob    update
~   vpc-native-update-views-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-personalized-digest-cron                     kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-user-companies-cron             kubernetes:batch/v1:CronJob    update
~   vpc-native-generate-search-invites-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-update-highlighted-views-cron                kubernetes:batch/v1:CronJob    update
~   vpc-native-materialize-yearly-best-post-archives-cron   kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-opportunities-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-history-day-clickhouse-cron   kubernetes:batch/v1:CronJob    update
~   vpc-native-private-deployment                           kubernetes:apps/v1:Deployment  update
~   vpc-native-check-analytics-report-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-calculate-top-readers-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-gifted-plus-cron                       kubernetes:batch/v1:CronJob    update
~   vpc-native-update-tags-str-cron                         kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-clickhouse-cron               kubernetes:batch/v1:CronJob    update
~   vpc-native-update-current-streak-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-materialize-monthly-best-post-archives-cron  kubernetes:batch/v1:CronJob    update
~   vpc-native-update-achievement-rarity-cron               kubernetes:batch/v1:CronJob    update
-   vpc-native-api-clickhouse-migration-9c214bbe            kubernetes:batch/v1:Job        delete
... and 15 other changes

@idoshamun idoshamun force-pushed the codex/schedule-all-post-types branch 3 times, most recently from b4e3a0f to ec0301c Compare July 3, 2026 11:18
@idoshamun idoshamun force-pushed the codex/schedule-all-post-types branch from ec0301c to 603e4d7 Compare July 5, 2026 06:50
@idoshamun idoshamun merged commit 1a60d48 into main Jul 5, 2026
9 checks passed
@idoshamun idoshamun deleted the codex/schedule-all-post-types branch July 5, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant